﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model.DTO;
using Plugins.Jwt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DotNetCoreApi.Controllers
{
    /// <summary>
    /// Jwt获取Token
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class JwtController : BaseController
    {
        public JwtHelper jwtHelper { get; set; }
        /// <summary>
        /// 获取Token
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [ProducesResponseType(typeof(ReturnJson<string>), 200)]
        public string GetToken()
        {
            return jwtHelper.GetToken();
        }
    }
}
